import {defHttp} from '/@/utils/http/axios';
import {Modal} from 'ant-design-vue';

enum Api {
  list = "/auth-service/extLdpConnect/list",
  save = "/auth-service/extLdpConnect/save",
  edit = "/auth-service/extLdpConnect/update",
  delete = "/auth-service/extLdpConnect/delete",
}

export const listLdpConnect = (params) => {
  return defHttp.get({url: Api.list, params});
}


export const saveOrUpdateLdpConnect = (params, isUpdate) => {
  let url = isUpdate ? Api.edit : Api.save;
  return defHttp.post({url: url, params});
}

export const deleteLdpConnect = (params, handleSuccess) => {
  return defHttp.delete({url: Api.delete, data: params}, {joinParamsToUrl: true}).then(() => {
    handleSuccess();
  });
}